﻿using Inovout.Security.Repositories;
using Inovout.Services;
using NHibernate.Criterion;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Inovout.Security.Services
{
    public class PermissionService : RepositoryService<Permission>, IPermissionService
    {
        protected PermissionRepository PermissionRepository { get { return base.Repository as PermissionRepository; } }
        public IList<Permission> FindByActor(IActor actor)
        {
            return PermissionRepository.FindByActor(actor);
        }

        public Permission FindByActorAndPrivilege(IActor actor,Privilege privilege) 
        {
            return PermissionRepository.FindByActorAndPrivilege(actor, privilege);    
        }
    }
}
